-- GENERATED SPELL FOR [Dunemaul Warlock] --


function spell0_5475(pUnit, Event) --@Curse of Thorns,n/a--
pUnit:FullCastSpellOnTarget(6909,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5475', 2000, 1)
end

function spell1_5475(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(2941,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5475', 17000, 1)
end

function spell2_5475(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5475', 3000, 1)
end

function Sorts_5475(pUnit, Event)
local choix_sorts_5475 = math.random(0, 2)
if choix_sorts_5475 == 0 then
pUnit:RegisterEvent('spell0_5475', 1, 1)
end
if choix_sorts_5475 == 1 then
pUnit:RegisterEvent('spell1_5475', 1, 1)
end
if choix_sorts_5475 == 2 then
pUnit:RegisterEvent('spell2_5475', 1, 1)
end
end

function mob5475_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5475', math.random(1500, 3000), 1)
end

function mob5475_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5475_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5475_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5475, 1, 'mob5475_Action')
RegisterUnitEvent(5475, 2, 'mob5475_Leave')
RegisterUnitEvent(5475, 3, 'mob5475_Kill')
RegisterUnitEvent(5475, 4, 'mob5475_Die')
